package cn.com.wdjedu.androidapp.wjeduandroid;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;

/**
 * Created by samson on 25/11/2016.
 */

public class StartActivity extends FragmentActivity {

//    private  RefWatcher refWatcher;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_startapp);
//        //检测内存溢出
//        refWatcher = LeakCanary.androidWatcher(getApplicationContext(),
//                new ServiceHeapDumpListener(getApplicationContext(), DisplayLeakService.class),
//                AndroidExcludedRefs.createAppDefaults().build());
//        refWatcher.watch(this);

        new Handler().postDelayed(new Runnable() {
            public void run() {
                /* Create an Intent that will start the Main WordPress Activity. */
                //startActivity(new Intent(getApplication(),MainActivity.class));
                startActivity(new Intent(getApplication(),MainActivity.class));
                finish();
            }
        }, 2900); //2900 for release
//        try {
//            reportFullyDrawn();
//        }catch (SecurityException e){
//
//        }

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

    }

    @Override
    protected void onResume() {
        super.onResume();
//        JPushInterface.onResume(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
//        JPushInterface.onPause(this);
    }

//    public void initJGPush(Activity activity){
//        JPushInterface.setDebugMode(true);
//        JPushInterface.init(activity);
//    }

}
